#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "StdThreadPool.h"



void *threadHandler(void *arg)
{
    long num = (long)arg;
    printf("我是线程%ld\n",num);
    sleep(1);
    return NULL;
}

int main()
{
    ThreadP *p = InitThreadPool(20,10,15,2);

    for(long i = 0; i < 21; i++)
    {
        AddPoolTask(p,threadHandler,(void*)i + 1);
    }
    sleep(2);
    ClearThreadPool(p);
    return 0;
}